Ramp generator for multilevel class-D amplifiers

ABSTRACT

A multi-level ramp generator comprises three ramp generators. The first ramp generator generates a first ramp signal, comprising a sawtooth voltage waveform with a first common mode voltage and a first peak to peak voltage. The second ramp generator generates a second ramp signal, comprising a sawtooth voltage waveform with a second common mode voltage and a second peak-to-peak voltage. The third ramp generator generates a third ramp signal, comprising a sawtooth voltage waveform with a third common mode voltage and the second peak-to-peak voltage. The second and third ramp signals are in phase with each other and the first ramp signal is 180° out of phase with the second and third ramp signals. In some implementations, each of the first, second, and third ramp generators comprise a respective delay locked loop and a respective voltage controlled oscillator.

BACKGROUND

In some amplifier applications, a “class-D” amplifier architecture is used. For example, a class-D amplifier may be used in battery-powered audio applications. Multi-level class-D amplifiers may be coupled to a charge pump, which increases a voltage from a power supply and may be used to deliver higher power to a load (e.g., a speaker). In a multi-level class-D amplifier, the pulse width modulated output may switch between three voltage levels. The three voltage levels may be ground, a battery voltage, and a linked voltage from the charge pump. In some such systems, two ramp generators generate triangular voltage waveforms that are compared to an input signal to be amplified. The comparison of the input signal with the two ramps results in pulse width modulated signals. These pulse width modulated signals are provided to a controller in the amplifier, and inform control of an output stage of the amplifier. Use of only two ramps may cause an amplifier to be susceptible to common mode noise and to lose information in the negative part of the input signal.

SUMMARY

A multi-level ramp generator comprises three ramp generators. Each ramp generator outputs a ramp that is a sawtooth voltage waveform. The first ramp has a first common mode voltage. The second ramp has a second common mode voltage. The first and second ramps have the same peak-to-peak voltage and are in phase with each other. The third ramp has a third common mode voltage and a different peak-to-peak voltage, and is 180 degrees out of phase with the first and second ramps. Each of the first, second, and third ramp generators receive a reference clock signal and respective voltage reference signals: a respective common mode voltage reference signal, a respective high voltage reference signal, and a respective low voltage reference signal. The difference between the high voltage and the low voltage reference signals for each respective ramp generator corresponds to the respective peak-to-peak voltage for the respective ramp generator. The high voltage reference signal for the third ramp is the same as the low voltage reference signal for the first ramp and the low voltage reference signal for the third ramp is the same as the high voltage reference signal for the second ramp.

Each of the first, second, and third ramp generators comprise a respective delay locked loop coupled to a respective voltage controlled oscillator. Each respective delay locked loop is configured to receive the same reference. Each respective voltage controlled oscillator is configured to receive the respective voltage reference signals for the respective ramp, and configured to output the respective ramp. Each respective delay locked loop includes a phase frequency detector, a charge pump, a loop filter, and a transconductance circuit. In some examples, the multi-level ramp generator also includes a bias voltage common mode generator configured to generate a respective common mode voltage reference signal for each respective ramp generator and a reference voltage generator configured to generate the respective high and low voltage reference signals for each respective ramp generator.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example output stage of an amplifier.

FIG. 2 illustrates an example of the operation of the example output stage of FIG. 1 for a lower power mode of operation.

FIG. 3 shows a waveform of an example amplifier output node during both lower and higher power modes of operation and a waveform of an example filtered input signal.

FIG. 4 shows an example output stage of an amplifier including a charge pump.

FIG. 5 shows a model of an example higher power mode of operation of the charge pump in the example output stage of FIG. 4.

FIG. 6 shows a waveform of an example amplifier output node during lower, mid-level, and higher power modes of operation characteristic of the example output stage of FIG. 4 and a waveform of an example filtered input signal.

FIG. 7 shows an example amplifier including the example output stage of FIG. 4 and an example multi-level ramp generator.

FIG. 8 shows waveforms characteristic of the example amplifier of FIG. 7.

FIG. 9 shows an example multi-level ramp generator.

FIG. 10 shows an example ramp generator in an example multi-level ramp generator.

FIG. 11 shows example comparison logic and example modulation logic in the example amplifier of FIG. 7.

FIG. 12 shows example mode detection logic in the example amplifier of FIG. 7.

DETAILED DESCRIPTION

As described herein, a class-D amplifier includes a multi-level ramp generator that generates three or more ramps for comparison with the input signal. In one example, the multi-level ramp generator generates three ramps, each of which is a triangular voltage waveform. All three ramps have the same frequency but different common mode voltages. Two of the three ramps are in phase with one another and have the same peak-to-peak voltages. The third ramp is 180 degrees out of phase with the other two ramps, and has a different peak-to-peak voltage than the other two ramps.

To generate ramp signals with these characteristics, the multi-level ramp generator includes a bias voltage common mode generator, a reference voltage generator, and an independent ramp generator for each ramp signal. The independent ramp generators each include a delay locked loop and a ramp generator based voltage control oscillator. The three delay locked loops allow the three independent ramp generators to synchronize to a common clock signal and generate ramps with finely controlled and aligned phases while preserving the independent operation and feedback of the ramp generators.

FIG. 1 illustrates an example output stage 100 of an amplifier. Additional components may be included as part of the amplifier as well, at least some of which are illustrated in other figures and discussed below. In the example of FIG. 1, the output stage 100 includes a charge pump 110 and a multi-level class-D full bridge driver 120. The charge pump 110 is coupled to a voltage source node 105 and to a second node 115. The voltage source node 105 may be coupled to a voltage source (not shown), and thus the voltage on the voltage source node 105 may be the voltage of that particular voltage source. In one example, the voltage source is a battery, although the voltage source can be other than a battery in other examples. The voltage source node 105 is labeled as “VBATT” to illustrate the example in which the voltage source is a battery. The voltage source node 105 is referred to herein as the “VBATT node”.

Node 115 is labeled as “VLINK” to illustrate voltage output by charge pump 110 linked to bridge driver 120. Node 115 is referred to herein as the “VLINK node”. The charge pump 110 may be part of, or separate from, the amplifier's output stage 100. The charge pump 110 receives the voltage from the VBATT node 105 and generates an output voltage that is greater than the voltage on the VBATT node. The output voltage from the charge pump 110 is provided to the VLINK node 115. In this example, the charge pump 110 outputs a voltage that is three times the voltage at the VBATT node 105, but any appropriate increase in voltage may be used.

The bridge driver 120 in the example of FIG. 1 includes eight transistors shown as M1, M2, M3, M4, M5, M6, M7, and M8 arranged into three switch networks. The first switch network 150 includes M1 and M2. The drains of M1 and M2 connect to the VLINK node 115. The source of M1 is connected to a node 130, which represents the positive output node (OUTP) of the amplifier. The source of M2 is connected to a node 135, which represents the negative (minus) output node (OUTM) of the amplifier. Each of M1 and M2 is controlled by respective control signals shown in FIG. 1 as CTL1 (for M1) and CTL2 (for M2) applied to the respective gates of M1 and M2. The first switch network 150 connects a voltage at VLINK node 115 to the output nodes OUTP 130 and OUTM 135.

The third switch network 170 includes M3 and M4. The sources of M3 and M4 are connected to a common potential (e.g., ground). The drain of M3 is connected to OUTP node 130 and the drain of M4 is connected to OUTM node 135. M3 is controlled by control signal CTL3 applied to its gate. M4 is controlled by control signal CTL4 applied to its gate. The third switch network 170 connects a common potential to the output nodes OUTP 130 and OUTM 135.

The second switch network 160A includes M5 and M6 and the second switch network 160B includes M7 and M8. The sources of M5 and M7 connect to VBATT node 105. The drain of M5 connects to the drain of M6. The drain of M7 connects to the drain of M8. The source of M6 connects to OUTP node 130. The source of M8 connects to OUTM node 135. M5, M6, M7, and M8 are controlled by a respective control signal applied to the respective gates of the transistors. M5 is controlled by control signal CTL5, M6 is controlled by control signal CTL6, M7 is controlled by control signal CTL7, and M8 is controlled by control signal CTL8. The second switch network 160A connects a voltage at VBATT node 105 to OUTP node 130. The second switch network 160B connects a voltage at VBATT node 105 to OUTM node 135.

In some examples, at least one of the transistors M1-M8 is a laterally diffused metal oxide semiconductor field effect transistor (LDMOS). In some implementations, all of the transistors M1-M8 are LDMOS transistors. In the example of FIG. 1, transistors M1-M8 are n-type LDMOS transistors. The bulk (sometimes called “back gate”) connection of each transistor may be connected to the source of the respective transistor. Switches and control logic to dynamically connect the bulk of each transistor to different potentials and nodes need not be included. The transistors M1-M8 are shown as metal oxide semiconductor field effect transistors, but can be implemented as other types of transistors, for example bipolar junction transistors.

In operation, the transistors M1-M8 of the output stage 100 provide voltage to OUTP node 130 and OUTM node 135, and by extension to a load 140 connected to them. Transistors M1-M8 are controlled in multiple different modes of operation depending on the magnitude of the input signal to be amplified. For example, a lower power mode of operation is used in response to the input signal being less than a threshold level and a higher power mode of operation is used in response to the input signal being greater than the threshold level. Each of these operational modes is explained below.

FIG. 2 illustrates the lower power mode of operation. In this mode, the input signal is less than a threshold and the voltage from the battery is sufficient. The first switch network 150 disconnects the voltage at VLINK node 115 from output nodes OUTP 130 and OUTM 135. Control logic (shown in other figures) generates control signals CTL1 and CTL2 to maintain M1 and M2 in an off state, as indicated by the “X”s through M1 and M2. While M1 and M2 are in an off state, the voltage on VLINK node 115 remains the boosted voltage from the charge pump, which is available to the output nodes at any time. In response to the output amplification increase, M1 and M2 may immediately begin toggling to transfer the boosted voltage from the charge pump. While the output stage 100 operates in a lower power mode and the charge pump 110 is disconnected from bridge drive 120, charge pump 110 may operate in a lower power mode of operation at a lower frequency, for example 50 kiloHerz (kHz).

While the amplifier operates in the lower power mode of operation and M1 and M2 are kept in an off state, the control logic also generates control signals CTL5 and CTL7 to maintain M5 and M7 in an on state. As such, the VBATT voltage, and not VLINK, may be switched through M5 and M6 to OUTP node 130 and through M7 and M8 to OUTM node 135 as shown by the dashed arrows.

During the positive half cycle of the positive input signal and the negative half cycle of the negative input signal, the control logic generates control signals CTL4 and CTL8 to maintain M4 in an on state and M8 in an off state, causing the voltage on OUTM node 135 to be ground. The control logic also generates control signals CTL6 and CTL3 to reciprocally toggle M6 and M3 on and off, causing the voltage on OUTP node 130 to toggle between VBATT and ground as shown in sections 310 and 330 of FIG. 3.

During the negative half cycle of the positive input signal and the positive half cycle of the negative input signal, not shown in FIG. 3, the controller generates control signals CTL3 and CTL6 to maintain M3 in an on state and M6 in an off state, causing the voltage on OUTP node 130 to be ground. The control logic also generates control signals CTL4 and CTL8 to reciprocally toggle M4 and M8 on and off, causing the voltage on OUTM node 15 to toggle between VBATT and ground.

Thus, the output of the amplifier comprises OUTP node 130 and OUTM node 135 and provides a differential output, which in the lower power mode of operation varies between +VBATT and −VBATT. Some implementations may include a current recycling phase, where both OUTM and OUTP are at the same voltage potential by having M3 and M4 (or M6 and M8) on at the same time. During this phase, current is recycled through the transistor switches in the on state.

FIG. 3 shows a waveform for OUTP 130 of output stage 100 in FIG. 1 during both lower and higher power modes of operation, and a waveform of the filtered input signal INP. In response to the INP signal being less than a threshold level, the lower power mode of operation is used as shown in sections 310 and 330. While the output stage 100 operates in a lower power mode, the charge pump 110 may be disconnected from bridge driver 120, and the OUTP voltage switches between the battery voltage at VBATT 105 and ground, as described herein with reference to FIG. 2. The OUTP waveform in section 320 illustrates the OUTP voltage in response to the magnitude of the INP signal being greater than the threshold. While the output stage 100 operates in a higher power mode, the charge pump 110 may provide the boosted voltage at VLINK node 115, and by extension deliver higher power to the load. In the higher power mode of operation, the voltage on VLINK node 115 switches between the increased voltage VLINK from the charge pump 110 and the battery voltage from VBATT 105.

FIG. 4 shows an example output stage 400 of an amplifier including a charge pump 410. The output stage 400 is described herein with reference to FIG. 1 and includes a variable frequency charge pump 410 and a bridge driver 120. Charge pump 410 in the example of FIG. 4 includes seven transistors, shown as CP-M1, CP-M2, CP-M3, CP-M4, CP-M5, CP-M6 and CP-M7, where CP indicates charge pump. The source of CP-M1 connects to VBATT node 105 and the drain connects to node 405. A capacitor C1 connects to node 405 and node 415. The drain of CP-M2 and the source of CP-M3 connect to node 415. The source of CP-M2 connects to a common potential (e.g., ground). The drain of CP-M3 connects to VBATT node 105. CP-M1, CP-M2, and CP-M3 are controlled by respective control signals not shown in FIG. 4, which are applied to the respective transistors' gate terminals.

The source of CP-M4 connects to node 405, and the drain connects to node 425. A capacitor C2 connects to node 425 and node 420. The drain of CP-M5 and the source of CP-M6 connect to node 420. The source of CP-M5 connects to a common potential (e.g., ground). The drain of CP-M6 connects to VBATT node 105. CP-M4, CP-M5, and CP-M6 are controlled by respective control signals not shown in FIG. 4, which are applied to the respective transistors' gate terminals. The source of CP-M7 connects to node 425, and the drain connects to VLINK node 115. CP-M7 is controlled by a control signal not shown in FIG. 4 which is applied to the gate terminal. A capacitor C3 connects to VLINK node 115 and a common potential (e.g., ground).

In operation, during a first clock phase, CP-M1 and CP-M2 are maintained in an on state, and C1 is charged to approximately VBATT. CP-M3 and CP-M4 are maintained in an off state. During a second clock phase initiated after C1 is charged to approximately VBATT, CP-M3, CP-M4, and CP-M5 are maintained in an on state. C2 is charged to approximately two times VBATT while CP-M1, CP-M2, CP-M6, and CP-M7 are maintained in an off state. During a third clock phase initiated after C2 is charged to approximately two times VBATT, CP-M6 and CP-M7 are maintained in an on state, and C3 is charged to approximately three times VBATT. CP-M4 and CP-M5 are maintained in an off state. Thus, the voltage at VLINK node 115 is approximately three times VBATT. In this way, the charge pump 410 transfers power to VLINK node 115, and the power at VLINK node 115 is transferred through bridge driver 120 to load 140, as indicated by the dashed arrows.

The third clock phase may also be used to charge C1 at the same time. As discussed above, CP-M4 is maintained in an off state while C1 and C3 are charged. While CP-M6 and CP-M7 are maintained in an on state and CP-M4 and CP-M5 are maintained in an off state to charge C3, CP-M1 and CP-M2 may be maintained in an on state and CP-M3 maintained in an off state to charge C1. In this case, the first clock phase and the third clock phase are the same. While only three stages are shown here, any number of stages may be used to increase the voltage at VLINK node 115 to any appropriate level.

The use of capacitors causes the charge pump to be cheaper, lower profile, and smaller size than a similar inductor-based boost converter. As discussed above with reference to FIG. 2, the capacitors store charge such that the boosted voltage from the charge pump is available to the bridge driver 120 at any time. In contrast, inductor based boost converters cannot maintain the boosted voltage at VLINK node 115 and may experience a delay while the inductors charge, resulting in a slower increase in the voltage on VLINK node 115. Inductor based boost converters use a voltage regulator to control the voltage available to other circuits from the inductor based boost converter.

Inductor based boost converters may experience difficulties with stability as the inductors and capacitors oscillate. Further, design of controllers for inductor based boost converters may be difficult because they work in tandem with a voltage regulator to control the voltage output to VLINK node 115. In contrast, the capacitive charge pump 410 maintains a steadier voltage on VLINK node 115 at all times and is controlled in part by an open feedback loop associated with voltage on the output nodes, the same feedback loop used to inform control of bridge driver 120. This results in a single feedback circuit providing feedback to both the charge pump 410 and the bridge driver 120. The control complexity is thus lower than in some inductor based boost converters, which use two separate closed loop feedback circuits—one for the inductor based boost converter and another for the bridge driver. The chip area devoted to control of the capacitor based charge pump 410 is also smaller than in some inductor based boost converters and amplifiers.

While the output stage 400 operates at a higher power mode of operation, charge pump 410 provides the increased voltage to VLINK node 115. The first switch network 150 connects the voltage at VLINK node 115 to output nodes OUTP 130 and OUTM 135, while the third switch network 170 disconnects the common potential from output nodes OUTP 130 and OUTM 135.

During the positive half cycle of the positive input signal and the negative half cycle of the negative input signal, control logic (shown in other figures) generates control signals CTL4 and CTL7 to maintain M4 and M7 in an on state and control signals CTL2 and CTL8 to maintain M2 and M8 in an off state, causing the voltage on OUTM 135 to be the common potential. The control logic also generates control signal CTL6 to maintain M6 in an on state and control signal CTL3 to maintain M3 in an off state, disconnecting the common potential from OUTP 130 as indicated by the “X” through M3. The control logic generates control signals CTL1 and CTL5 to reciprocally toggle M1 and M5 on and off, causing the voltage on OUTP 130 to switch between VLINK and VBATT.

During the negative half cycle of the positive input signal and the positive half cycle of the negative input signal, the control logic generates control signal CTL8 to maintain M8 in an on state and control signal CTL4 to maintain M4 in an off state, disconnecting the common potential from OUTM 135 as indicated by the “X” through M4. The control logic also generates control signals CTL2 and CTL7 to reciprocally toggle M2 and M7 on and off, causing the voltage on OUTM 135 to switch between VLINK and VBATT. The control logic also generates control signals CTL3 and CTL5 to maintain M3 and M5 in an on state and control signals CTL1 and CTL6 to maintain M1 and M6 in an off state, causing the voltage on OUTP 130 to be the common potential.

Because M1 and M5 are reciprocally turned on and off, the voltage on OUTP node 130 may toggle between VLINK and VBATT as shown in section 320 of FIG. 3. Because M2 and M7 are reciprocally turned on and off, the voltage on OUTM node 135 may toggle between VLINK and VBATT. Thus, the output node of the amplifier comprises OUTP node 130 and OUTM node 135 and provides a differential output, varying between +VLINK and −VLINK. The state of M6 and M8 need not be on or off for bridge driver 120 to output voltage between +VLINK and −VLINK. In some implementations, M6 and M8 are maintained in an on state for ease of control.

In some examples, the charge pump 410 operates at variable frequencies according to the power used by the amplifier. While the magnitude of the INP signal is greater than the threshold, the output stage 400 operates in a higher power mode, and charge pump 410 provides the boosted voltage through VLINK node 115. While output stage 400 operates in the higher power mode, the charge pump 410 may operate at a mid-level power mode or a higher power mode of operation. At the mid-level power mode, the charge pump 410 operates at a lower frequency than it does in its higher power mode of operation. For example, the charge pump 410 illustrated in FIG. 4 operates at 760 kiloHerz (kHz) in the mid-level power mode, but operates at 1.52 MHz in the higher power mode. The lower frequency and the higher frequency may be selected based on the FET driving losses within the charge pump and the capacitance of C1, C2, and C3.

The mid-level power mode or higher power mode of operation of charge pump 410 is selected based on the duty cycle of the amplifier output. For example, control logic indicates charge pump 410 operates in mid-level power mode based on the pulse width modulation signal at VLINK node 115 having a duty cycle less than a threshold value. In the example of FIG. 4, the charge pump 410 operates in mid-level power mode based on the pulse width modulation signal at VLINK node 115 having a duty cycle less than 50%. Control logic indicates charge pump 410 operates in higher power mode based on the pulse width modulation signal at VLINK node 115 having a duty cycle greater than a threshold value. In the example of FIG. 4, the charge pump 410 operates in higher power mode in response to the pulse width modulation signal at VLINK node 115 having a duty cycle greater than 50%.

FIG. 5 is a model of the charge pump 410 in the example output stage 400 of FIG. 4. As it operates at higher frequencies, the output impedance of the charge pump 410 decreases, and the current output deliverable by charge pump 410 increases. The charge pump 410 effectively operates as a step-up transformer coupled to VBATT node 105 and resistor R0. R0 represents the output impedance of the charge pump 410 and is further coupled to VLINK node 115. Capacitor C3 is coupled between VLINK node 115 and a common potential (e.g., ground). The transformer comprises a primary winding 510 and a secondary winding 520, where the ratio of the number of turns in the primary winding, Np, to the number of turns in the secondary winding, Ns, in this example is 1:3. This illustrates that charge pump 410 continues to provide approximately three times the voltage of VBATT to VLINK node 115. As the frequency increases, the output impedance R0 decreases and the voltage at VLINK node 115 approaches VLINK.

FIG. 6 shows a waveform OUTP 130 of output stage 400 in FIG. 4 during lower and higher power modes of operation characteristic of output stage 400, and a waveform of the filtered input signal INP. As shown in and described with reference to FIG. 3, in response to the INP signal being less than a threshold level such as VBATT in this example, the lower power mode of operation 610 for output stage 400 is used and illustrated as sections 310 and 330. While the output stage 400 operates in lower power mode 610, the charge pump 410 may be disconnected from bridge driver 120 and operate in a lower power mode at a lower frequency, such as 50 kHz as discussed above with reference to FIG. 2, while maintaining the boosted voltage at VLINK node 115. The OUTP voltage results from the battery voltage at VBATT 105 alone, as described herein with reference to FIG. 2.

The OUTP waveform in section 320 illustrates the OUTP voltage in response to the magnitude of the INP signal being greater than the threshold, VBATT in this example. While the output stage 400 operates in a higher power mode 620, the charge pump 410 may provide the boosted voltage at VLINK node 115. The charge pump 410 operates in a mid-level power mode 630 and a higher power mode 640, as described herein with reference to FIGS. 4 and 5. In mid-level power mode 630, the example charge pump 410 operates at a lower frequency, such as 760 kHz. In higher power mode 640, the example charge pump 410 operates at a higher frequency, such as 1.52 MHz. As described herein with reference to FIG. 4, the charge pump 410 operates in mid-level power mode 630 in response to the pulse width modulation signal at VLINK node 115 having a duty cycle less than 50% and operates in higher power mode 640 in response to the signal having a duty cycle greater than 50%.

The different frequencies of operation allow charge pump 410 to dynamically respond to the changing power used by output stage 400 based on the desired amplification of the input signal. While output stage 400 operates in a lower power mode, charge pump 410 operates at a lower power mode as well, at a lower frequency such as 50 kHz. The capacitors within charge pump 410 maintain the boosted VLINK voltage on VLINK node 115 while charge pump 410 operates at a lower power mode. While output stage 400 operates in a higher power mode, charge pump 410 operates in either a mid-level power mode or a higher power mode and the corresponding frequencies, increasing the power available to the output nodes based on the desired amplification of the input signal.

FIG. 7 shows an example amplifier 700 including the output stage 400 described herein with reference to FIG. 4 and a multi-level ramp generator 730. The amplifier 700 in this example also includes a subtractor 710P, a subtractor 710M, a loop filter 720, comparison logic 740, and controller 750. An input signal 705 to be amplified includes two signals: INP 705P and INM 705M. INP 705P represents the positive input signal, and INM 705M represents the negative (minus) input signal. INP 705P is provided to the subtractor 710P, and INM 705M is provided to the subtractor 710M.

The difference signal from each subtractor is then filtered by loop filter 720, which may comprise a fourth-order filter, to generate two filtered input signals, INTP 722 and INTM 724. Loop filter 720 compensates for non-linear factors in example amplifier 700, for example dead time. INTP 722 corresponds to INP 705P and has a similar shape as INP 705P. INTM 724 corresponds to INM 705M and has a similar shape as INM 705M. Multi-level ramp generator 730 generates three triangular voltage waveforms: RAMP_HI 732, RAMP_MID 734, and RAMP_LO 736. The three RAMP signals are compared to INTP 722 and INTM 724 by comparison logic 740 to generate pulse width modulated signals, which are the comparator outputs 745 provided to the controller 750.

The control logic noted above may include the controller 750 and/or other components shown in FIG. 7. The controller 750 includes modulation logic 752, drivers 754, and mode detection 756. Modulation logic 752 and drivers 754 generate the control signals CTL1-CTL8 discussed herein with reference to FIG. 1 that are provided to the gates of M1-M8 in the output stage 100. Mode detection 756 generates the control signals provided to the gates of CP-M1 through CP-M7 in charge pump 410 discussed herein with reference to FIG. 4. The assorted control signals 760 generated by controller 750 are provided to output stage 400. The output signal generated by the output stage 400 (e.g., the voltages on OUTP 130 and OUTM 135) is provided to the speaker and also serves as a feedback signal to the subtractors 710.

FIG. 8 illustrates an example of the three triangular voltage waveforms generated by multi-level ramp generator 730, and an example INTP 722 waveform and INTM 724 waveform. RAMP_HI 732 has a minimum voltage of V2 and a maximum voltage of V3. RAMP_MID 734 has a minimum voltage of V1 and a maximum voltage of V2. RAMP_LO 736 has a minimum voltage of V0 and a maximum voltage of V1. The voltage difference between V3 and V2, the voltage difference between V2 and V1, and the voltage difference between V1 and V0 (referred to as the peak-to-peak voltage for the ramps) may be selected such that the overall relationship from the input to the comparators to the output of the final output stage maintains a substantially constant gain. For example, the peak-to-peak voltages for RAMP_HI 732 and RAMP_LO 736 are chosen to have the same ratio as the difference between VLINK and VBATT. The peak-to-peak voltage for RAMP_MID 734 is chosen to have the same ratio as the difference between VBATT and ground. RAMP_HI 732, RAMP_MID 734, and RAMP_LO 736 may have different peak-to-peak magnitudes and different common mode levels as shown. The use of three ramp signals, each with different common mode levels, may capture information related to the negative parts of INTP 722 and INTM 724 that would be outside the voltage range covered by only two ramp signals. This may reduce common mode error and the total harmonic distortion of the amplifier.

A portion of the signals output by the loop filter 720, INTP 722 and INTM 724, are shown superimposed on the sawtooth waveforms of RAMP_HI 732, RAMP_MID 734, and RAMP_LO 736. Voltages V2 and V1, the range of RAMP_MID 734, generally represent the threshold voltages for determining whether the controller 750 is to operate the output stage 400 in the lower power mode of operation 610 or the higher power mode of operation 620 noted above. While the magnitudes of INTP 722 and INTM 724 are less than V2 but greater than V1, for example as identified at 810, the output 745 of comparison logic 740 includes a time varying square wave with a first duty cycle, which corresponds to the pulse width modulation signal associated with the voltage VBATT. While the magnitudes of INTP 722 and INTM 724 are greater than V2 or less than V1, for example as identified at 820, the output 745 of comparison logic 740 includes a time varying square wave with a second duty cycle, which corresponds to the pulse width modulation signal associated with voltage VLINK.

The controller 750 uses the output signals 745 from the comparison logic 740 of varying duty cycles to determine whether the output stage 400 should be operated in the lower power mode of operation 610 without use of the voltage from the charge pump 410 or in the higher power mode of operation 620 to use the voltage from charge pump 410. If the controller 750 determines the output stage 400 should be operated in the higher power mode of operation 620, the controller 750 further determines whether the charge pump 410 should be operated in the mid-level power mode of operation 630 at the lower frequency or in the higher power mode of operation 640 at the higher frequency based on the duty cycles of the output signals 745 from the comparison logic 740. The controller 750 and comparison logic 740 are discussed further with reference to FIG. 11.

RAMP_HI 732, RAMP_MID 734, and RAMP_LO 736 have the same frequency, carefully controlled amplitudes, and different common modes. Further, RAMP_MID 734 is 180° out of phase with RAMP_HI 732 and RAMP_LO 736 such that the maxima of RAMP_MID 734 are aligned with the minima of RAMP_HI 732, and the minima of RAMP_MID 734 are aligned with the maxima of RAMP_LO 736. The frequencies of RAMP_HI 732, RAMP_MID 734, and RAMP_LO 736 are within a certain threshold of similarity to be considered the same and the alignment of maxima and minima of RAMP_HI 732, RAMP_MID 734, and RAMP_LO 736 are within a certain threshold of alignment to be considered aligned. The thresholds of similarity and alignment may depend on the particular implementation. In one example, the threshold frequency similarity may be 1%, such that the frequencies of RAMP_HI 732, RAMP_MID 734, and RAMP_LO 736 are considered the same when within 1% of each other. To generate RAMP signals with these characteristics, multi-level ramp generator 730 includes an independent ramp generator for each RAMP signal.

FIG. 9 shows an example multi-level ramp generator 900 for use in an amplifier, such as amplifier 700 described herein with reference to FIG. 7. Ramp generator 900 includes a bias voltage common mode (VCM) generator 910, a reference voltage generator 920, and three ramp generators: high ramp generator 930, middle ramp generator 940, and low ramp generator 950. As shown in FIG. 8, each ramp has a different common mode level. The bias VCM generator 910 generates a VCM for each ramp generator: VCM_HI 912 for high ramp generator 930, VCM_MID 914 for middle ramp generator 940, and VCM_LO 916 for low ramp generator 950. In some implementations, the bias VCM generator 910 generates a single VCM, such as VCM_MID 914, for all three ramp generators 930, 940, and 950. VCM_HI 912 and VCM_LO 916 are then generated using the peak-to-peak voltages of each ramp and the corresponding voltage difference relative to VCM_MID 914.

Reference voltage generator 920 generates a high voltage reference signal and a low voltage reference signal for each ramp generator to indicate the upper and lower voltages of each ramp, such as voltages V0, V1, V2, and V3 described herein with reference to FIG. 8. Reference voltage generator 920 generates REFHI_HI 932 and REFHI_LO 934 for high ramp generator 930, which in the example of FIG. 8 correspond to V3 and V2. Reference voltage generator 920 generates REFMID_HI 942 and REFMID_LO 944 for middle ramp generator 940, which in the example of FIG. 8 correspond to V2 and V1. Reference voltage generator 920 generates REFLO_HI 952 and REFLO_LO 954 for low ramp generator 950, which in the example of FIG. 8 correspond to V1 and V0. REFHI_LO 934 and REFMID_HI 942 are the same voltage. Similarly, REFMID_LO 944 and REFLO_HI 952 are the same voltage. REFHI_LO 934 and REFMID_HI 942 or REFMID_LO 944 and REFLO_HI 952 may be within a certain threshold of similarity to be considered the same voltage. The thresholds of similarity may depend on the particular implementation. In one example, the threshold voltage similarity may be 1%, such that the voltages of REFHI_LO 934 and REFMID_HI 942 or REFMID_LO 944 and REFLO_HI 952 are considered the same when within 1% of each other.

Each of high ramp generator 930, middle ramp generator 940, and low ramp generator 950 receive the appropriate VCM signal from bias VCM generator 920, the appropriate high voltage reference signal and low voltage signal from reference voltage generator 930, and the same clock reference signal. From these inputs, high ramp generator 930 generates RAMP_HI 732, middle ramp generator 940 generates RAMP_MID 734, and low ramp generator 950 generates RAMP_LO 736.

FIG. 10 shows an example ramp generator 1000 in multi-level ramp generator 900. Ramp generator 1000 includes a delay locked loop (DLL) 1010 and a ramp generator based voltage controlled oscillator (VCO) 1050. The DLL 1010 allows multi-level ramp generator 900 to synchronize the frequencies of the generated ramps to a single reference clock, and includes a phase-frequency detector (PFD) 1015, a charge pump 1020, a loop filter 1025, and a transconductance circuit 1030. The PFD 1015 receives the reference clock signal CLK_REF and a clock feedback signal CLK_FB, and outputs signals UP and DN, which are square waves with a pulse width proportional to the phase difference between CLK_REF and CLK_FB. Charge pump 1020 receives UP and DOWN from PFD 1015 and works in conjunction with loop filter 1025 as an integrator to generate a voltage control signal VCtrl. VCtrl is converted to a current control signal ICtrl through transconductance circuit 1030.

Ramp generator based VCO 1050 receives ICtrl, as well as the high reference voltage signal and the low voltage reference signal for the particular ramp generator, such as those generated by reference voltage generator 920. Ramp generator based VCO 1050 outputs the particular ramp signal for the particular ramp generator and the clock feedback signal CLK_FB. For example, ramp generator based VCO 1050 receives VCM_HI 912, REFHI_HI 932, and REFHI_LO 934 and outputs RAMP_HI 732. The ramp generated by ramp generator based VCO 1050 is provided to other components in the amplifier, such as comparison logic 740, while CLK_FB is provided to PFD 1015 in a closed feedback loop.

FIG. 11 shows an example comparison logic and modulation logic in the example amplifier 700 of FIG. 7. As described above with reference to FIGS. 7 and 8, comparison logic 740 compares INTP 722 and INTM 724 to the ramps RAMP_HI 732, RAMP_MID 734, and RAMP_LO 736 generated by multi-level ramp generator 730. The results of these comparisons are used by controller 750 to determine which mode of operation output stage 400 should be operated in, and to generate appropriate control signals for elements within output stage 400. Analysis blocks 1100A, 1100B, and 1100C illustrate operation of an example comparison logic 740 and modulation logic 752. Analysis block 1100A results in control signals for M1 and M5, analysis block 1100B results in control signals for M3, M4, M6, and M8, and analysis block 1100C results in control signals for M2 and M7.

In analysis block 1100A, comparator 1105 compares RAMP_LO 736 and INTM 724, and outputs a pulse width modulated signal that is logic high in response to RAMP_LO 736 being greater than INTM 724 and logic low in response to RAMP_LO 736 being less than INTM 724. Comparator 1110 compares INTP 722 and RAMP_HI 732, and outputs a pulse width modulated signal that is logic high in response to INTP 722 being greater than RAMP_HI 732 and logic low in response to INTP 722 being less than RAMP_HI 732. OR gate 1115 in modulation logic 752 receives the output signals of comparator 1105 and comparator 1110, and outputs CTL1 for M1 in output stage 400.

As discussed above with reference to FIGS. 4, M1 and M5 cannot be on at the same time, and so CTL1 passes through inverter 1120 to become CTL5 for M5. Thus, analysis block 1100A results in the control signals for M1 and M5. While output stage 400 is in a higher power mode of operation 620, CTL1 and CTL5 cause M1 and M5 to toggle on and off reciprocally, and provide either VLINK or VBATT to OUTP node 130. While output stage 400 is in a lower power mode of operation 610, CTL1 causes M1 to maintain an off state, disconnecting bridge driver 120 and OUTP node 130 from VLINK node 115, and CTL5 causes M5 to maintain an on state.

In analysis block 1100B, comparator 1125 compares INTP 722 and RAMP_MID 734, and outputs a pulse width modulated signal that is logic high in response to INTP 722 being greater than RAMP_MID 734 and logic low in response to INTP 722 being less than RAMP_MID 734. In response to INTP 722 being greater than RAMP_MID 734, output stage 400 operates in a higher power mode. Comparator 1130 compares INTM 724 and RAMP_MID 734, and outputs a pulse width modulated signal that is logic high in response to INTM 724 being greater than RAMP_MID 734 and logic low in response to INTM 724 being less than RAMP_MID 734.

AND gate 1140 in modulation logic 752 receives the output signal of comparator 1125 directly, and the output signal of comparator 1130 after it is inverted by inverter 1135. AND gate 1140 outputs CTL6 for M6 in output stage 400. As discussed above with reference to FIGS. 2, M6 and M3 cannot be on at the same time, and so CTL6 passes through inverter 1140 to become CTL3 for M3. Thus, analysis block 1100B results in the control signals for M3 and M6. While output stage 400 is in a higher power mode of operation 620, CTL3 causes M3 to maintain an off state, disconnecting ground from OUTP node 130, and CTL6 causes M6 to maintain its current state. While output stage 400 is in a lower power mode of operation 610, CTL3 and CTL6 cause M3 and M6 to toggle on and off reciprocally, and provide either ground or VBATT to OUTP node 130.

AND gate 1155 in modulation logic 752 receives the output signal of comparator 1130 directly, and the output signal of comparator 1125 after it is inverted by inverter 1150. AND gate 1155 outputs CTL8 for M8 in output stage 400. As discussed above with reference to FIGS. 2, M8 and M4 cannot be on at the same time, and so CTL8 passes through inverter 1160 to become CTL4 for M4. Thus, analysis block 1100B also results in the control signals for M4 and M8. While output stage 400 is in a higher power mode of operation 620, CTL4 causes M4 to maintain an off state, disconnecting ground from OUTM node 135, and CTL8 causes M8 to maintain an on state. While output stage 400 is in a lower power mode of operation 610, CTL4 and CTL8 cause M4 and M8 to toggle on and off reciprocally, and provide either ground or VBATT to OUTM node 135.

In analysis block 1100C, comparator 1165 compares RAMP_LO 736 and INTP 722, and outputs a pulse width modulated signal that is logic high in response to RAMP_LO 736 being greater than INTP 722 and logic low in response to RAMP_LO 736 being less than INTP 722. Comparator 1170 compares INTM 724 and RAMP_HI 732, and outputs a pulse width modulated signal that is logic high in response to INTM 724 being greater than RAMP_HI 732 and logic low in response to INTM 724 being less than RAMP_HI 732. OR gate 1175 in modulation logic 752 receives the output signals of comparator 1165 and comparator 1170, and outputs CTL2 for M2 in output stage 400.

As discussed above with reference to FIGS. 4, M2 and M7 cannot be on at the same time, and so CTL2 passes through inverter 1180 to become CTL7 for M7. Thus, analysis block 1100C results in the control signals for M2 and M7. While output stage 400 is in a higher power mode of operation 620, CTL2 and CTL7 cause M2 and M7 to toggle on and off reciprocally, and provide either VLINK or VBATT to OUTM node 135. While output stage 400 is in a lower power mode of operation 610, CTL2 causes M2 to maintain an off state, disconnecting bridge driver 120 and OUTM node 135 from VLINK node 115, and CTL7 causes M7 to maintain an on state.

FIG. 12 shows an example mode detection logic 756 in the example amplifier 700 of FIG. 7. Analysis block 1210 determines if output stage 400 is operating in a lower power mode 160. Analysis block 1250 determines if output stage 400 is operating in a higher power mode 620, and whether charge pump 410 should operate in a mid-level power mode 630 or in a higher power mode 640.

In analysis block 1210, OR gate 1215 receives CTL6 and CTL8, and outputs an indicator signal 1220 that is logic high in response to CTL6 or CTL8 being a pulse width modulated signal. Indicator signal 1220 is input to a pulse duration detector 1225. Output signal 1230 from pulse duration detector 1225 is logic high in response to indicator signal 1220 including pulse width modulated pulses. This in turn indicates output stage 400 is operating in a lower power mode 610, and VBATT from the battery is sufficient. Charge pump 410 should operate in a mid-level power mode 630 at a lower frequency or in a lower power mode itself, for example at a frequency as low as 47 kHz.

In analysis block 1250, OR gate 1255 receives CTL1 and CTL2, and outputs an indicator signal 1260 that is logic high in response to either M1 or M2 being in an on state and logic low in response to both M1 and M2 being in an off state, disconnecting charge pump 410 from bridge driver 120. Indicator signal 1260 is associated with voltage VLINK, and is input to an edge detector 1265 and a pulse duration detector 1275. The duty cycle of indicator signal 1260 is indicative of how long OUTP node 130 and OUTM node 135 receive VLINK from charge pump 410.

If edge detector 1265 detects a logic high value from indicator signal 1260, but pulse duration detector 1275 determines indicator signal 1260 has a duty cycle less than a certain threshold, then output stage 400 is operating in a higher power mode 620, but the mid-level power mode and corresponding lower frequency of operation for charge pump 410 delivers sufficient power to the load. If the pulse duration detector 1275 determines indicator signal 1260 has a duty cycle greater than a certain threshold, then output stage 400 is operating in a higher power mode 620, and charge pump 410 should operate in a higher power mode 640 at a higher frequency to deliver additional power to the load.

In this description, the term “couple” or “couples” means either an indirect or direct connection. Thus, if a first device couples to a second device, that connection may be through a direct connection or through an indirect connection via other devices and connections. The recitation “based on” means “based at least in part on.” Therefore, if X is based on Y, X may be a function of Y and any number of other factors.

Modifications are possible in the described examples, and other implementations and modifications are possible, within the scope of the claims. 

What is claimed is:
 1. An amplifier, comprising: a multi-level ramp generator including: a first ramp generator having an output configured to provide a first ramp that is a sawtooth voltage waveform with a first common mode voltage and a first peak-to-peak voltage; a second ramp generator having an output configured to provide a second ramp that is a sawtooth voltage waveform with a second common mode voltage and a second peak-to-peak voltage; and a third ramp generator having an output provide a third ramp that is a sawtooth voltage waveform with a third common mode voltage and the second peak-to-peak voltage, wherein the second and third ramps are in phase with each other and 180 degrees out of phase with the first ramp; a comparison logic circuit configured to compare the ramps and an input signal; and a controller configured to provide control signals to operate an output stage in a first mode of operation if a voltage of the input signal is within a first range of voltages, or in a second mode of operation if the voltage of the input signal is outside the first range of voltages.
 2. The amplifier of claim 1, including a charge pump configured to convert a first voltage from a first voltage source node to a second voltage at a second voltage node, wherein the second voltage is greater than the first voltage.
 3. The amplifier of claim 2, wherein the amplifier is an audio amplifier, and wherein the first voltage is supplied by a battery.
 4. The amplifier of claim 2, wherein the first peak-to-peak voltage is proportional to a difference between the first voltage and ground.
 5. The amplifier of claim 2, wherein the second peak-to-peak voltage is proportional to a difference between the second voltage and the first voltage.
 6. The amplifier of claim 1, wherein each of the first, second, and third ramp generators has a respective input adapted to receive a reference clock signal.
 7. The amplifier of claim 6, wherein the first ramp generator has inputs to receive a first common mode voltage reference signal, a first high voltage reference signal, and a first low voltage reference signal, wherein a difference between the first high voltage reference signal and the first low voltage reference signal corresponds to the first peak-to-peak voltage, and wherein the first common mode voltage reference signal corresponds to the first common mode voltage.
 8. The amplifier of claim 7, wherein the first high voltage reference signal corresponds to an upper boundary of the first range of voltages, and wherein the first low voltage reference signal corresponds to a lower boundary of the first range of voltages.
 9. The amplifier of claim 7, wherein the second ramp generator has inputs to receive a second common mode voltage reference signal, a second high voltage reference signal, and a second low voltage reference signal, wherein a difference between the second high voltage reference signal and the second low voltage reference signal corresponds to the second peak-to-peak voltage, and wherein the second common mode voltage reference signal corresponds to the second common mode voltage.
 10. The amplifier of claim 9, wherein the third ramp generator has inputs to receive a third common mode voltage reference signal, a third high voltage reference signal, and a third low voltage reference signal, wherein a difference between the third high voltage reference signal and the third low voltage reference signal corresponds to the second peak-to-peak voltage, and wherein the third common mode voltage reference signal corresponds to the third common mode voltage.
 11. The amplifier of claim 10, wherein: the first high voltage reference signal is the same as the second low voltage reference signal; and the first low voltage reference signal is the same as the third high voltage reference signal.
 12. The amplifier of claim 10, wherein each of the first, second, and third ramp generators comprise: a delay locked loop having an input to receive the reference clock signal; and a voltage controlled oscillator coupled to the delay locked loop, the voltage controlled oscillator having inputs to receive the corresponding common mode voltage reference signal, high voltage reference signal, and low voltage reference signal for the respective ramp generator, the voltage controlled oscillator also having an output to provide the ramp for the ramp generator. 